-- GENERATED SPELL FOR [Death Knight Initiate] --


function spell0_28406(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(52374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28406', 571, 1)
end

function spell1_28406(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(52375,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28406', 566, 1)
end

function spell2_28406(pUnit, Event) --@Death Grip,n/a--
pUnit:FullCastSpellOnTarget(49576,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28406', 0, 1)
end

function spell3_28406(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(52372,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28406', 20000, 1)
end

function spell4_28406(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(52373,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28406', 12000, 1)
end

function Sorts_28406(pUnit, Event)
local choix_sorts_28406 = math.random(0, 4)
if choix_sorts_28406 == 0 then
pUnit:RegisterEvent('spell0_28406', 1, 1)
end
if choix_sorts_28406 == 1 then
pUnit:RegisterEvent('spell1_28406', 1, 1)
end
if choix_sorts_28406 == 2 then
pUnit:RegisterEvent('spell2_28406', 1, 1)
end
if choix_sorts_28406 == 3 then
pUnit:RegisterEvent('spell3_28406', 1, 1)
end
if choix_sorts_28406 == 4 then
pUnit:RegisterEvent('spell4_28406', 1, 1)
end
end

function mob28406_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28406', math.random(1500, 3000), 1)
end

function mob28406_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28406_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28406_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28406, 1, 'mob28406_Action')
RegisterUnitEvent(28406, 2, 'mob28406_Leave')
RegisterUnitEvent(28406, 3, 'mob28406_Kill')
RegisterUnitEvent(28406, 4, 'mob28406_Die')
